Management of application state data

ABSTRACT

Disclosed are various embodiments for synchronizing application state information across devices. More specifically, embodiments of the disclosure are related to generating and storing of application state information. Key-value pairs are stored on a client device and synchronized with an application synchronization service.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of and claims the benefit of U.S.patent application Ser. No. 13/921,503, entitled “MANAGEMENT OFAPPLICATION STATE DATA,” and filed Jun. 19, 2013, issued as U.S. Pat.No. 9,244,993, which is hereby incorporated by reference in itsentirety.

BACKGROUND

Applications that are distributed via an application marketplace areoften installed on multiple devices by a user. A developer of anapplication may wish to synchronize state information across themultiple installations across various devices of a particularapplication. The state information is generated by the various instancesof the application executing on the client devices that are associatedwith a particular user.

BRIEF DESCRIPTION OF THE DRAWINGS

Many aspects of the present disclosure can be better understood withreference to the following drawings. The components in the drawings arenot necessarily to scale, emphasis instead being placed upon clearlyillustrating the principles of the disclosure. Moreover, in thedrawings, like reference numerals designate corresponding partsthroughout the several views.

FIGS. 1A-1B are drawings of example applications executed by clientdevices according to various embodiments of the present disclosure.

FIG. 2 is a drawing of a networked environment according to variousembodiments of the present disclosure.

FIG. 3 is a flowchart illustrating one example of functionalityimplemented as portions of an application executed in a client deviceaccording to various embodiments of the present disclosure.

FIG. 4 is a flowchart illustrating one example of functionalityimplemented as portions of an application executed in a client deviceaccording to various embodiments of the present disclosure.

FIG. 5 is a schematic block diagram that provides one exampleillustration of a computing environment employed in the networkedenvironment of FIG. 2 according to various embodiments of the presentdisclosure.

FIG. 6 is a schematic block diagram that provides one exampleillustration of a client device employed in the networked environment ofFIG. 2 according to various embodiments of the present disclosure.

DETAILED DESCRIPTION

The present disclosure relates to synchronizing data associated with thestate of an application between multiple devices that may be associatedwith a user. Applications that are distributed via an applicationmarketplace are often installed on multiple devices associated with auser account. For example, a user may own a tablet device as well as asmartphone and install an application distributed by the applicationmarketplace on both devices. Accordingly, embodiments of the disclosurecan facilitate synchronization of data relating to the applicationacross the various devices associated with the user by employing anapplication synchronization service to which applications reportapplication state information, which can in turn facilitatesynchronization of application state information across multiple devicesof the user.

When an application is a game application, application state informationcan comprise, for example, information that is related to gameapplications, such as scoring data, game progress, game achievements,game timing information, time stamps, and any other information relatingto execution of a game. Application state information can also relatedto media such as books, movies, music, etc., that are rendered orconsumed via a media player application. In this scenario, theapplication state information can relate to a page number and/or timecode within media that a user last viewed and/or consumed. Applicationstate information can also include information related to an accumulatedvalue, such as a report indicating the user's accumulation and/or usageor spending of coins or points during a gameplay session. Therefore,embodiments of the present disclosure provide mechanisms for caching andstorage of application state information on a client device executingthe application.

With reference to FIGS. 1A-1B, shown is an example scenario in which anapplication executed by client devices 103 a and 103 b. In the scenario100 shown in FIGS. 1A-1B, the application can be distributed by anapplication marketplace. In the example of FIGS. 1A-1B, the clientdevices 103 a and 103 b are associated with a particular user account.In other words, the user or other entity has installed the sameapplication on multiple devices. An application synchronization servicecan be associated with the application marketplace and/or independentfrom an application marketplace and facilitates synchronization of gamestate data.

As shown in the example of FIG. 1A, an application instance is executedby the client device 103 a can incorporate functionality in which a usermay utilize an account held with a third party service for the purposeof tracking accumulation of coins or points, tracking achievements, gameprogress, game scores, or any other data related to the state of anapplication that can be saved. Accordingly, an application can bebundled with a software library and/or code fragments related to anapplication marketplace and/or application synchronization service thatfacilitate the creation of application state information in a datastructure that can be transmitted to a synchronization service. As shownin the client device 103 b that is also associated with the user,another application instance corresponding to the same application maybe executed by another device associated with the user.

Accordingly, each application instance may report, for example, scoringinformation 105 a, 105 b that is synchronized across all instances ofexecution of the application that are associated with a particular useraccount. Accordingly, as shown in the scenario of FIGS. 1A and 1B, theuser may earn points in a gameplay session on a first device as well ason a second device, with the scoring information being synchronizedacross the devices of the user that is facilitated by embodiments of thedisclosure.

Accordingly, to facilitate such synchronization, applications may beinstrumented to store information pertaining to events that occur duringexecution of the application, such as the accumulation of points, highscores, and other state information as can be appreciated. Informationabout events can be stored in the form of key-value pairs that aregenerated by the application, stored locally within the client device103, and synchronized via an application synchronization service, aswill be described in further detail herein. In the following discussion,a general description of the system and its components is provided,followed by a discussion of the operation of the same.

Turning now to FIG. 2, shown is a networked environment 200 according tovarious embodiments. The networked environment 200 includes a computingenvironment 203 and one or more clients 103 in data communication via anetwork 209. The network 209 includes, for example, the Internet,intranets, extranets, wide area networks (WANs), local area networks(LANs), wired networks, wireless networks, or other suitable networks,etc., or any combination of two or more such networks.

The computing environment 203 may comprise, for example, a servercomputer or any other system providing computing capability.Alternatively, the computing environment 203 may employ a plurality ofcomputing devices that may be arranged, for example, in one or moreserver banks or computer banks or other arrangements. Such computingdevices may be located in a single installation or may be distributedamong many different geographical locations. For example, the computingenvironment 203 may include a plurality of computing devices thattogether may comprise a cloud computing resource, a grid computingresource, and/or any other distributed computing arrangement. In somecases, the computing environment 203 may correspond to an elasticcomputing resource where the allotted capacity of processing, network,storage, or other computing-related resources may vary over time.

Various applications and/or other functionality may be executed in thecomputing environment 203 according to various embodiments. Also,various data is stored in a data store 212 that is accessible to thecomputing environment 203. The data store 212 may be representative of aplurality of data stores 212 as can be appreciated. The data stored inthe data store 212, for example, is associated with the operation of thevarious applications and/or functional entities described below.

The components executed on the computing environment 203, for example,include an application marketplace system 219, applicationsynchronization service 221 and other applications, services, processes,systems, engines, or functionality not discussed in detail herein. Theapplication marketplace system 219 may communicate with the clientdevice 103 using various protocols such as, for example, hypertexttransfer protocol (HTTP), simple object access protocol (SOAP),representational state transfer (REST), real-time transport protocol(RTP), real time streaming protocol (RTSP), real time messaging protocol(RTMP), user datagram protocol (UDP), transmission control protocol(TCP), and/or other protocols for communicating data over the network209.

The application marketplace system 219 is executed to providefunctionality relating to an application marketplace in which amultitude of applications 233 may be submitted by developers and madeavailable for purchase and/or download by users. The applicationmarketplace system 219 may include functionality relating to electroniccommerce, e.g., shopping cart, ordering, and payment systems. Theapplication marketplace system 219 may support searching andcategorization functionality so that users may easily locateapplications 233 that are of interest. The application marketplacesystem 219 may include functionality relating to verification ofcompatibility of applications 233 with various clients 103.

The application synchronization service 221 is executed to synchronizeapplication state information 241 associated with instances ofapplications 233 executed by various client devices 103 that areassociated with a user account. Application state information 241 caninclude information relating to application usage that is associatedwith an application instance executed by a client device 103. Forexample, application state information 241 can include a score orachievement achieved by a user in an application instance. Applicationstate information 241 can also include saved game data, or a score,level, or other state information from which a user may resume gameplayat a later point in time on the same client device 103 or another clientdevice 103.

The data stored in the data store 212 includes, for example,applications 233, saved state data 234 relating to applications 233 thatare executed by client devices 103, application marketplace data 235,and potentially other data. The applications 233 correspond to thoseapplications 233 that have been submitted by developers and/or others,for example, for inclusion in the application marketplace. Theapplication 233 may correspond, for example, to a game or other types ofapplications. As non-limiting examples, the application 233 maycorrespond to a first-person shooter game, an action game, an adventuregame, a party game, a role-playing game, a simulation game, a strategygame, a vehicle simulation game, and/or other types of games.

The application 233 may be a game originally designed for execution in ageneral-purpose computing device or in a specialized video game devicesuch as, for example, a video game console, a handheld game device, anarcade game device, etc. The applications 233 may also correspond tomobile phone applications, computer-aided design (CAD) applications,computer-aided manufacturing (CAM) applications, photo manipulationapplications, video editing applications, office productivityapplications, operating systems and associated applications, emulatorsfor operating systems, architectures, and capabilities not present on aconsumer device, and other applications and combinations ofapplications. Where game applications are mentioned in the followingtext, it is understood that game applications are merely examples of themany different types of applications 233.

The application 233, when executed by a client device 103, may expect toaccess one or more resources of the client device on which it isexecuted. Such resources may correspond to display devices, inputdevices, or other devices. In some cases, the application 233 mayrequest exclusive access to one or more of the resources, whereby noother applications may have access to the particular resources. Eachapplication 233 may include, for example, object code, binary code,source code, metadata and/or other data. The object code corresponds tocode that is executable by clients 103, either natively by a processoror by way of a virtual machine executed by the processor.

The saved state data 234 that is maintained by the applicationmarketplace system 219 includes various data relating to execution ofapplications 233 by client devices 103 that are associated with aparticular user account. For example, the saved state data 234 mayinclude one or more accumulated totals, such as a coin balance or pointbalance, information about progress of a user within execution of anapplication by users, such as a level at which a user has progressedwithin a game, scoring information, achievement information relating toa game, etc. Saved state data 234 can be organized into various keys 255and corresponding values 257. Accordingly, a key 255 can represent anevent name of an event occurring in an application 233 executed by aclient device 103 that an application developer may wish to synchronizeacross the various devices of a user. The key 255 can also take the formof an event name or event identifier that is combined with asynchronization rule. The value 257 can represent the value associatedwith the event, such as a coin balance, point balance, score, lap time,level, page number, or any other data about application state that adeveloper wishes to synchronize across the various devices of a user.

The data associated with the application marketplace data 235 includes,for example, download information, categories, application usage dataand/or other data. The download information indicates the popularity,either in terms of absolute number of downloads or in terms of relativepopularity, of the applications 233 offered by the applicationmarketplace data 235. The download information can also identify users,either individually by a user account and/or on an aggregate basisaccording to demographic category, who have downloaded a particularapplication 233. The categories correspond to groupings of applications233 that may indicate similar applications 233 and may be employed byusers to more easily navigate the offerings of the applicationmarketplace data 235. Non-limiting examples of categories may includesocial networking applications 233, mapping applications 233, movieinformation applications 233, shopping applications 233, musicrecognition applications 233, and so on. The application marketplacedata 235 can also include information about users, such as user profiledata, user authentication information, usage data of users with regardto application 233 (e.g., game progress, high scores, and achievements).

The application marketplace data 235 can also include information aboutthe various client devices 103 that are registered to user accounts ofthe application marketplace system 219. Accordingly, the applicationmarketplace data 235 can relate a device identifier with a user accountso that the application synchronization service 221 may determine whichclient device 103 corresponds to a given key 255 and/or value 257 thatis stored in the data store 212.

The client device 103 is representative of a plurality of client devicesthat may be coupled to the network 209. The clients 103 may begeographically diverse. The client device 103 may comprise, for example,a processor-based system such as a computer system. Such a computersystem may be embodied in the form of a desktop computer, a laptopcomputer, personal digital assistants, cellular telephones, smartphones,set-top boxes, music players, web pads, tablet computer systems, gameconsoles, electronic book readers, or other devices with likecapability.

The client device 103 may include a display device. The display maycomprise, for example, one or more devices such as cathode ray tubes(CRTs), liquid crystal display (LCD) screens, gas plasma-based flatpanel displays, LCD projectors, or other types of display devices, etc.The client device 103 may include one or more input devices. The inputdevices may comprise, for example, devices such as keyboards, mice,joysticks, accelerometers, light guns, game controllers, touch pads,touch sticks, push buttons, optical sensors, microphones, webcams,and/or any other devices that can provide user input. Additionally,various input devices may incorporate haptic technologies in order toprovide feedback to the user.

The client device 103 may be configured to execute various applications233 that are distributed via the application marketplace system 219. Anapplication 233 executed by a client device 103, as is noted above, canbe instrumented to generate data related to the occurrence of eventsduring execution of the application 233. The data generated by theapplication 233 can be synchronized by the application synchronizationservice 221 across the various client devices 103 that are registered toa particular user account. To this end, the application 233 or asoftware library or other code fragment that is invoked by theapplication 233 can generate a key and a value that are associated witha particular event occurring within an application 233.

The client device 103 is configured with an application state cache 243that can cache key-value pairs associated with an event occurring withinan application 233. The application state cache 243 can be maintainedand/or stored in memory. The client device 103 is also configured withclient device storage 260, which can comprise a mass storage device suchas disk storage, flash memory storage, non-volatile memory, or any othertype of mass storage device. The client device storage 260 includesapplication state storage 261, which can store information pertaining toevents occurring during execution of an application 233. For example,the application state storage 261 can store a key 263 that correspondsto a particular event occurring within an application 233. Each key 263can also have a corresponding value 265 that represents a particularvalue associated with the event. Additionally, the application can alsobe configured to generate a timestamp that corresponds to an eventoccurring during execution of the application 233. In some embodiments,the application 233 can generate and/or set a status flag 268 thatcorresponds to the event. The status flag 268 can indicate whether avalue 265 corresponding to a particular key 263 has changed since a mostrecent synchronization event.

The application state storage 261 can take the form of various datastructures, such as a map, hash table, tree, or any other data structurein which key-value pairs or other data can be stored. Accordingly, a key263 and value 265 that are generated and/or updated by the application233 in response to the occurrence of an event during execution of theapplication 233 are first cached within the application state cache 243.Then, key-value pairs that are generated by the application 233 andcached in memory within the application state cache 243 are stored bythe application 233 within the application state storage 261 of theclient device 103. The key 263 and value 265 can be stored inassociation with a timestamp as well as potentially a status flag 268that indicates whether the key 263 and/or value 265 has been transmittedto the application synchronization service 221 for storage in the datastore 212.

To transmit state information corresponding to an application 233 to theapplication synchronization service 221, the application 233 cangenerate application state information 241 that includes data related toone or more events occurring within one or more applications 233executed by the client device 103 for transmission to the applicationsynchronization service 221. The application state information 241 cancomprise a data structure that includes data associated with an eventoccurring during execution of an instance of one or more applications233. For example, application state information 241 can include datarelated to an accumulated value, such as a coin balance of a user,associated with execution of the application 233 by a client device 103,a high score of a user within a game application, game progress statusof a user related to a game application and any other events that mightbe generated within the application 233 and which the application 233 isinstrumented to synchronize data with the application synchronizationservice 221.

Various techniques relating to synchronization of application stateinformation are described in U.S. patent application Ser. No. 13/850,119entitled “RESOLVING CONFLICTS WITHIN SAVED STATE DATA,” filed Mar. 25,2013; and U.S. Patent Application entitled “IDEMPOTENCY OF APPLICATIONSTATE DATA,” filed Jun. 19, 2013; both of which are incorporated hereinby reference in their entirety.

Next, a general description of the operation of the various componentsof the networked environment 200 is provided. As noted above, anapplication 233 executing by a client device 103 can be instrumentedupon the occurrence of an event during execution of an applicationinstance to generate application state information 241 containinginformation about the event. For example, when a certain level and/orachievement within a game application are reached, the application 233can generate information about the event, which can be cached within theapplication state cache 243. As a user reaches certain milestones oraccomplishes tasks within an application 233, the application 233 can beconfigured to award coins, points, or any other reward balance.Additionally, the user may spend these rewards to unlock portions of anapplication 233 and/or obtain other rewards or items, which cause adecrease in the accumulated total associated with the user. As yetanother example, the user's progress within a game application can alsobe tracked and application state information 241 identifying scores,times (e.g., lap times, time to complete levels, time to reachmilestones, etc.) or other state information associated with theapplication 233 can be generated.

The application 233 can generate application state information 241 byutilizing a software library having an application programming interface(API) provided by and/or associated with the application synchronizationservice 221 so that the application state information 241 can be createdin a standardized data format. In other embodiments, the application 233can be instrumented to generate application state information 241 in astandardized data format.

The data format corresponding to application state information 241 canbe implemented as a text-based data interchange format, such asJavaScript Object Notation (JSON), or any other standardized orproprietary data interchange format that can allow for the exchange ofstructured data. Accordingly, the application 233 executed by a clientdevice 103 can generate and transmit application state information 241to the application synchronization service 221, which can extract andstore the application state information 241 as saved state data 234.

Application state information 241 may be transmitted by the application233 to the application synchronization service 221 asynchronously frommultiple client devices 103 when a particular client device 103 has thecapability to transmit data via the network 209. For example, theapplication 233 can cache application state information 241 in theapplication state cache 243 in the client device 103, transmit theapplication state information 241 upon the occurrence of an event, suchas termination of the application, network 209 accessibility, thereaching of a level and/or achievement within an application, a size ofthe application state cache 243 and/or application state storage 261reaching a threshold size, after the passage of a threshold amount oftime since a most recent generation and transmission of applicationstate information 241 to the application synchronization service, or inresponse to any other event or threshold. Application state information241 can also be generated in real time as and when events are generatedwithin an application instance corresponding to the application 233, orupon the occurrence of other events.

Accordingly, because a client device 103 may execute multipleapplications 233 that employ the services the applicationsynchronization service 221, a software library invoked by theapplication 233 may provide any or all of the functionality describedherein. Additionally, the application state cache 243 may be generatedby such a software library and maintained in memory on the client device103 for use by various applications 233 executed by the client device103. Similarly, the application state storage 261 can be generated bysuch a software library and maintained in the client device storage 260for use by various applications 233 executed by the client device 103.

Therefore, when an application 233 is executed by the client device 103,an event may occur for which the application 233 is instrumented togenerate a corresponding key and value (e.g., event name and eventvalue). The application 233 can also generate a corresponding statusflag and/or timestamp. As noted above, the status flag can indicate thatthe key and value have been updated since a most recent synchronizationwith the application synchronization service 221, or a “synchronizationevent.” The key, value and timestamp can be initially stored in theapplication state cache 243 by the application 233. Upon expiration of apredetermined waiting period after storing of the data in theapplication state cache 243, the application 233 can then store the key263, value 265 and status flag 268 in the application state storage 261.Some applications 233 may be instrumented to generate multiple eventsand corresponding key-value pairs within close temporal proximity to oneanother. For example, upon completion of a level within a gameapplication by a user, the application 233 may be instrumented togenerate various events relating to scoring information, progress data,achievement accumulation, and various other events associated with thecompletion of a level and for which key-value pairs are generated withinclose temporal proximity.

Therefore, the predetermined waiting period allows multiple possiblekey-value pairs to be stored into the application state cache 243 and inturn allows these key-value pairs to be batch submitted to storage inthe application state storage 261. Batch submission of key-value pairsfrom the application state cache 243 can reduce resource consumption onthe client device 103 by potentially limiting numerous accesses to themass storage resources of the client device 103. The predeterminedwaiting period can be, for example, 100 milliseconds, or any otherwaiting period that provides a sufficient buffer or waiting period forthe application 233 to potentially generate additional events andcorresponding key-value pairs. Additionally, in some embodiments theapplication 233 also stores a status flag 268 that provides anindication regarding whether a given key 263 and/or value 265 wascreated, changed or updated by the application 233 within theapplication state storage 261 since a most recent synchronization event.

The status flag 268 can have various possible values. For example, thestatus flag 268 can have a value that corresponds to a “synchronized”state. Such a state corresponds to a condition in which thecorresponding key 263 and value 265 do not require synchronization withthe application synchronization service 221. The status flag 268 canalso have a value that corresponds to a “dirty” state. Such a statecorresponds to a condition in which the corresponding key 263 and value265 have been created and/or modified since a most recentsynchronization event. The status flag 268 can also have a value thatcorresponds to a “synchronizing” state. Such a state corresponds to acondition in which the corresponding key 263 and value 265 are in theprocess of being transmitted from the client device 103 to theapplication synchronization service 221. Therefore, when a givenkey-value pair is created and/or updated, the status flag 268 can alsobe updated by the application 233 to indicate that the key-value pair isin a “dirty” state.

Should an additional event occur within the application 233 during theabove-referenced waiting period and should an additional key-value pairbe generated during the predetermined waiting period, the additionalkey-value pair can also be stored within the application state cache243. In some embodiments, the predetermined waiting period can be reset,or restarted, by the application 233 when an additional event occursduring the predetermined waiting period for which a key-value pair isstored in the application state cache 243 by the application 233.

The application 233 is also instrumented to periodically reportinformation related to its state (e.g., key-value pairs) in the form ofapplication state information 241. In some embodiments, the application233 can report information about multiple events that are assembled intoa data structure that is presented in a data interchange format, such asJavaScript Object Notation (JSON), and transmitted to the applicationsynchronization service 221 as application state information 241. Insome embodiments, the application 233 can periodically generate andtransmit application state information 241 to the applicationsynchronization service 221 according to a predefined schedule.

In other embodiments, the application 233 can generate application stateinformation 241 as and when key-value pairs are stored in applicationstate storage 261. In other embodiments, the application 233 cangenerate application state information 241 and transmit the applicationstate information 241 to the application synchronization service 221upon expiration of another predetermined waiting period that begins whena given key 263 and value 265 are stored in the application statestorage 261. Should an additional key 263 and value 265 be stored withinthe application state storage 261 during the other predetermined waitingperiod, the additional key-value pair can also be included in anapplication state information 241 data structure generated by theapplication 233. In some embodiments, the predetermined waiting periodcan be reset, or restarted, by the application 233 when an additionalkey-value pair is stored in the application state storage 261 during theother waiting period.

The application 233 can also be configured to generate application stateinformation 241 that only includes those items (e.g., key-value pairs)that have changed since a most recent synchronization with theapplication synchronization service 221. In other words, the applicationstate information 241 can be generated to include the items that havechanged since the most recent transmission of application stateinformation 241 to the application synchronization service 221.Accordingly, the application can generate application state information241 that includes those items having a status flag 268 in a “dirty”state. The application 233 can exclude from the application stateinformation 241 those items having a status flag 268 in a “synchronized”state, as these items do not require synchronization with theapplication synchronization service 221. Additionally, the application233 can also modify the status flag 268 of those items included withinthe application state information 241 to a “synchronizing” state untilthe application 233 transmits application state information 241including the items to the application synchronization service 221and/or receives a response from the application synchronization service221 indicating successful receipt of the application state information241, whereupon the application 233 can then modify the status flag 268of the items corresponding to the application state information 241 to“synchronized.” In this way, the application 233 can avoid duplicatetransmission of information about items to the applicationsynchronization service 221 during a subsequent synchronization event.

Therefore, the application 233 and/or software library that facilitatessynchronization with the application synchronization service 221 canidentify those values 265 within the application state storage 261 thathave been created, updated and/or changed since a most recentsynchronization event and generate application state information 241that includes those values 265 as well as other information, such as atimestamp, key 263, synchronization rule, and other data. In someembodiments, each time that the application 233 generates and transmitsapplication state information 241 to the application synchronizationservice 221, the application 233 can store a timestamp corresponding towhen the synchronization event occurred. Such a timestamp can be storedwithin the client device storage 260. Therefore, the application 233 canidentify those values 265 that have changed within the application statestorage 261 since a most recent synchronization event by identifyingvalues 265 associated with a timestamp that is later than the timestampassociated with the synchronization event. In other embodiments, theapplication 233 can identify those values 265 that have a status flag268 that corresponds to a “dirty” state.

Accordingly, the application can identify those items associated with astatus flag indicating that the key and/or value has not beensynchronized with the application synchronization service 221 andinclude data relating to the key 263 and value 265 in an applicationstate information 241 that is generated and transmitted to theapplication synchronization service 221. When the application 233obtains a response from the application synchronization service 221indicating that information about a particular key 263 and/or value 265corresponding to a “dirty” status flag 268 has been successfullyreceived by the application synchronization service 221, the application233 can then modify the status flag 268 to “synchronized.”

Referring next to FIG. 3, shown is a flowchart 300 that provides oneexample of execution of an application 233 executed by a client device103 to generate application state information 241 or a portion ofapplication state information 241. It is understood that the flowchartof FIG. 3 provides merely an example of the many different types offunctional arrangements that may be employed to implement the operationof the portion of an application 233 as described herein. As analternative, the flowchart of FIG. 3 may be viewed as depicting anexample of steps of a method implemented in the client device 103 thatreports application state information to the application synchronizationservice 221 for synchronization of state information across multipledevices of a user according to one or more embodiments.

First, in box 301, the application 233 executes functionality associatedwith the application 233 in a client device 103. As described above, theapplication 233 has been instrumented by a developer to generateapplication state information 241 corresponding to events that thedeveloper wishes to synchronize across multiple devices associated witha user account. In box 303, the application 233 determines whether anevent occurs during execution of the application for which data issynchronized by the application synchronization service 221. If so, thenin box 305, the application 233 generates a value corresponding to theevent. At box 307, the value corresponding to the event is stored in theapplication state cache 243. As noted above, the application state cache243 can be maintained in memory of the client device 103. At box 309,the application 233 imposes a waiting period to determine whetheradditional events occur during execution of the application 233 at box311

If an additional event for which a value is generated occurs during thewaiting period, then the process returns to box 305, where theadditional value is also stored in the application state cache 243. Ifno additional events occur during the waiting period, then at box 313,the application state data stored in the application state cache 243 isstored in the application state storage 261. At box 315, another waitingperiod is imposed while the application 233 determines whetheradditional data is stored into the application state storage 261 fromthe application state cache 243. If additional state data is stored intothe application state storage 261, then the process returns to box 313.Otherwise, the application 233 may generate application stateinformation 241 that is transmitted to the application synchronizationservice 221.

Referring next to FIG. 4, shown is a flowchart 400 that provides oneexample of execution of an application 233 executed by a client device103 to generate application state information 241 or a portion ofapplication state information 241 by determining what items withinapplication state storage have changed and generating application stateinformation 241 corresponding to the items that have been modified sincea most recent synchronization event. It is understood that the flowchartof FIG. 4 provides merely an example of the many different types offunctional arrangements that may be employed to implement the operationof the portion of an application 233 as described herein. As analternative, the flowchart of FIG. 4 may be viewed as depicting anexample of steps of a method implemented in the client device 103 thatreports application state information to the application synchronizationservice 221 for synchronization of state information across multipledevices of a user according to one or more embodiments.

First, in box 401, the application 233 executes functionality associatedwith the application 233 in a client device 103. At box 403, theapplication 233 determines whether a synchronization event occurs. Asnoted above, data can be synchronized with the applicationsynchronization service 221 periodically, upon the occurrence of anevent, upon the storage of data with the application state storage 261,etc. At box 405, the application 233 can identify the changed valueswithin application state storage based upon whether the timestamp of aparticular key 263 and/or value 265 indicates that a previoussynchronization event occurred before the value 265 was synchronizedwith the application synchronization service 221. As noted above, theapplication 233 may also identify those items that have changed withinapplication state storage 261 by identifying those items that areassociated with a status flag 268 indicating that the items have notbeen synchronized with the application synchronization service 221.

At box 407, the application 233 generates application state information241 that includes the values 265 and/or keys 263 as well as any otherdata related to the value 265 that have changed since a most recentsynchronization with the application synchronization service 221. At box409, the application 233 transmits the application state information 241to the application synchronization service 221.

With reference to FIG. 5, shown is a schematic block diagram of thecomputing environment 203 according to an embodiment of the presentdisclosure. The computing environment 203 includes one or more computingdevices 500. Each computing device 500 includes at least one processorcircuit, for example, having a processor 503 and a memory 506, both ofwhich are coupled to a local interface 509. To this end, each computingdevice 500 may comprise, for example, at least one server computer orlike device. The local interface 509 may comprise, for example, a databus with an accompanying address/control bus or other bus structure ascan be appreciated.

Stored in the memory 506 are both data and several components that areexecutable by the processor 503. In particular, stored in the memory 506and executable by the processor 503 are the application marketplacesystem 219, application synchronization service 221, and potentiallyother applications. Also stored in the memory 506 may be a data store212 and other data. In addition, an operating system may be stored inthe memory 506 and executable by the processor 503.

With reference to FIG. 6, shown is a schematic block diagram of theclient device 103 according to an embodiment of the present disclosure.The client device 103 includes at least one processor circuit, forexample, having a processor 603 and a memory 606, both of which arecoupled to a local interface 609. The local interface 609 may comprise,for example, a data bus with an accompanying address/control bus orother bus structure as can be appreciated. A display may also be coupledto the local interface 609.

Stored in the memory 606 are both data and several components that areexecutable by the processor 603. In particular, stored in the memory 506and executable by the processor 603 are an application 233 andpotentially other applications and/or software. In addition, anoperating system may be stored in the memory 606 and executable by theprocessor 603.

It is understood that there may be other applications that are stored inthe memory 506, 606 and are executable by the processor 503, 603 as canbe appreciated. Where any component discussed herein is implemented inthe form of software, any one of a number of programming languages maybe employed such as, for example, C, C++, C#, Objective C, Java®,JavaScript®, Perl, PHP, Visual Basic®, Python®, Ruby, Flash®, or otherprogramming languages.

A number of software components are stored in the memory 506, 606 andare executable by the processor 503, 603. In this respect, the term“executable” means a program file that is in a form that can ultimatelybe run by the processor 503, 603. Examples of executable programs maybe, for example, a compiled program that can be translated into machinecode in a format that can be loaded into a random access portion of thememory 506, 606 and run by the processor 503, 603, source code that maybe expressed in proper format such as object code that is capable ofbeing loaded into a random access portion of the memory 506, 606 andexecuted by the processor 503, 603, or source code that may beinterpreted by another executable program to generate instructions in arandom access portion of the memory 506, 606 to be executed by theprocessor 503, 603, etc. An executable program may be stored in anyportion or component of the memory 506, 606 including, for example,random access memory (RAM), read-only memory (ROM), hard drive,solid-state drive, USB flash drive, memory card, optical disc such ascompact disc (CD) or digital versatile disc (DVD), floppy disk, magnetictape, or other memory components.

The memory 506, 606 is defined herein as including both volatile andnonvolatile memory and data storage components. Volatile components arethose that do not retain data values upon loss of power. Nonvolatilecomponents are those that retain data upon a loss of power. Thus, thememory 506, 606 may comprise, for example, random access memory (RAM),read-only memory (ROM), hard disk drives, solid-state drives, USB flashdrives, memory cards accessed via a memory card reader, floppy disksaccessed via an associated floppy disk drive, optical discs accessed viaan optical disc drive, magnetic tapes accessed via an appropriate tapedrive, and/or other memory components, or a combination of any two ormore of these memory components. In addition, the RAM may comprise, forexample, static random access memory (SRAM), dynamic random accessmemory (DRAM), or magnetic random access memory (MRAM) and other suchdevices. The ROM may comprise, for example, a programmable read-onlymemory (PROM), an erasable programmable read-only memory (EPROM), anelectrically erasable programmable read-only memory (EEPROM), or otherlike memory device.

Also, the processor 503, 603 may represent multiple processors 503, 603and/or multiple processor cores and the memory 506, 606 may representmultiple memories 506, 606 that operate in parallel processing circuits,respectively. In such a case, the local interface 509, 609 may be anappropriate network that facilitates communication between any two ofthe multiple processors 503, 603, between any processor 503, 603 and anyof the memories 506, 606, or between any two of the memories 506, 606,etc. The local interface 509, 609 may comprise additional systemsdesigned to coordinate this communication, including, for example,performing load balancing. The processor 503, 603 may be of electricalor of some other available construction.

Although the application marketplace system 219, applicationsynchronization service 221 and other various systems described hereinmay be embodied in software or code executed by general purpose hardwareas discussed above, as an alternative the same may also be embodied indedicated hardware or a combination of software/general purpose hardwareand dedicated hardware. If embodied in dedicated hardware, each can beimplemented as a circuit or state machine that employs any one of or acombination of a number of technologies. These technologies may include,but are not limited to, discrete logic circuits having logic gates forimplementing various logic functions upon an application of one or moredata signals, application specific integrated circuits (ASICs) havingappropriate logic gates, field-programmable gate arrays (FPGAs), orother components, etc. Such technologies are generally well known bythose skilled in the art and, consequently, are not described in detailherein.

The flowcharts of FIG. 3-4 show the functionality and operation of animplementation of portions of the application synchronization service221 and/or application 233 executed by a client device 103. If embodiedin software, each block may represent a module, segment, or portion ofcode that comprises program instructions to implement the specifiedlogical function(s). The program instructions may be embodied in theform of source code that comprises human-readable statements written ina programming language or machine code that comprises numericalinstructions recognizable by a suitable execution system such as aprocessor 503, 603 in a computer system or other system. The machinecode may be converted from the source code, etc. If embodied inhardware, each block may represent a circuit or a number ofinterconnected circuits to implement the specified logical function(s).

Although the flowcharts of FIG. 3-4 show a specific order of execution,it is understood that the order of execution may differ from that whichis depicted. For example, the order of execution of two or more blocksmay be scrambled relative to the order shown. Also, two or more blocksshown in succession in flowcharts of FIGS. 3-4 may be executedconcurrently or with partial concurrence. Further, in some embodiments,one or more of the blocks shown in flowcharts of FIG. 3-4 may be skippedor omitted. In addition, any number of counters, state variables,warning semaphores, or messages might be added to the logical flowdescribed herein, for purposes of enhanced utility, accounting,performance measurement, or providing troubleshooting aids, etc. It isunderstood that all such variations are within the scope of the presentdisclosure.

Also, any logic or application described herein, including theapplication synchronization service 221, application 233, or any otherapplication or service, that comprises software or code can be embodiedin any non-transitory computer-readable medium for use by or inconnection with an instruction execution system such as, for example, aprocessor 503, 603 in a computer system or other system. In this sense,the logic may comprise, for example, statements including instructionsand declarations that can be fetched from the computer-readable mediumand executed by the instruction execution system. In the context of thepresent disclosure, a “computer-readable medium” can be any medium thatcan contain, store, or maintain the logic or application describedherein for use by or in connection with the instruction executionsystem.

The computer-readable medium can comprise any one of many physical mediasuch as, for example, magnetic, optical, or semiconductor media. Morespecific examples of a suitable computer-readable medium would include,but are not limited to, magnetic tapes, magnetic floppy diskettes,magnetic hard drives, memory cards, solid-state drives, USB flashdrives, or optical discs. Also, the computer-readable medium may be arandom access memory (RAM) including, for example, static random accessmemory (SRAM) and dynamic random access memory (DRAM), or magneticrandom access memory (MRAM). In addition, the computer-readable mediummay be a read-only memory (ROM), a programmable read-only memory (PROM),an erasable programmable read-only memory (EPROM), an electricallyerasable programmable read-only memory (EEPROM), or other type of memorydevice.

It should be emphasized that the above-described embodiments of thepresent disclosure are merely possible examples of implementations setforth for a clear understanding of the principles of the disclosure.Many variations and modifications may be made to the above-describedembodiment(s) without departing substantially from the spirit andprinciples of the disclosure. All such modifications and variations areintended to be included herein within the scope of this disclosure andprotected by the following claims.

Therefore, the following is claimed:
 1. A method, comprising:generating, in response to an occurrence of an event during execution ofan application by a client device, a key and a value corresponding tothe event; storing, by the client device, the key and the value in anapplication state cache stored in a memory of the client device;determining, by the client device, that at least one additional eventoccurs during the execution of the application during a predeterminedwaiting period after storage of the key and the value in the applicationstate cache; storing, by the client device, a second event and a secondvalue associated with the second event in the application state cache;storing, by the client device, the application state cache inapplication state data stored in a mass storage device associated withthe client device after expiration of the predetermined waiting period;and transmitting, by the client device, the application state data to anapplication synchronization service.
 2. The method of claim 1, furthercomprising: identifying, by the client device, a plurality of values inthe application state data that have changed since a previoussynchronization; identifying, by the client device, a timestampassociated with the previous synchronization; and determining, by theclient device, whether the timestamp was generated after respectivetimestamps associated with the event and the second event.
 3. The methodof claim 2, wherein identifying the plurality of values in theapplication state data that have changed since the previoussynchronization comprises identifying at least one value associated witha respective status flag indicating that the at least one value haschanged since the previous synchronization.
 4. The method of claim 1,further comprising: storing a third key and a third value associatedwith a third event to the application state cache during a subsequentpredetermined waiting period; updating the application state cache withthe third key and the third value; updating the application state datain the mass storage device with the third key and the third value uponexpiration of the subsequent predetermined waiting period; andtransmitting the application state data to the applicationsynchronization service.
 5. The method of claim 1, wherein transmittingthe application state data to the application synchronization service isperformed upon expiration of a second predetermined waiting period. 6.The method of claim 5, wherein the second predetermined waiting periodis subsequent to the predetermined waiting period.
 7. The method ofclaim 1, further comprising resetting the predetermined waiting periodupon storage of the application state cache in the mass storage device.8. The method of claim 1, further comprising resetting a synchronizationstatus flag associated with respective values within the applicationstate data upon transmission of the application state data to theapplication synchronization service.
 9. A system, comprising: a clientdevice; an application executed by the client device, the applicationconfigured to cause the client device to at least: execute anapplication, the application generating a value in response tooccurrence of an event; store the value within an application statecache in the client device; determine that an additional event hasoccurred during a predetermined waiting period, the additional eventassociated with a second value; store the second value in theapplication state cache; and store the value and the second value toapplication state data in a mass storage device in the client deviceupon expiration of the predetermined waiting period.
 10. The system ofclaim 9, the application further causing the client device to at least:associate the value with a key and a first timestamp; associate thesecond value with a second key and a second timestamp; and determinewhether the value and the second value have changed since a previoussynchronization with an application synchronization service based atleast in part upon the first timestamp and the second timestamp.
 11. Thesystem of claim 10, the application further causing the client device toat least initiate transmission of the key, the value, the second key,and the second value to an application synchronization service uponexpiration of an additional waiting period.
 12. The system of claim 11,the application further causing the client device to at least reset asynchronization status flag associated with respective values within theapplication state data upon transmission of the application state datato the application synchronization service.
 13. The system of claim 11,the application further causing the client device to at least set asynchronization status flag to indicate that respective values havechanged since a previous synchronization in response to at least oneevent occurring during execution of the application that change therespective values.
 14. The system of claim 9, the application furthercausing the client device to at least: store a third value to theapplication state cache during a subsequent predetermined waitingperiod; update the application state data in the mass storage devicewith the third value upon expiration of the subsequent predeterminedwaiting period; and transmit the updated application state data to anapplication synchronization service upon expiration of anothersubsequent predetermined waiting period.
 15. A non-transitorycomputer-readable medium embodying a program executable on a clientdevice, the program causing the client device to at least: execute anapplication, the application generating a value in response tooccurrence of an event; store the value within an application statecache in a memory of the client device; determine that a second eventhas occurred during a predetermined waiting period, the second eventassociated with an additional key and an additional value; store thesecond value in the application state cache; and store the value and thesecond value in application state data in a mass storage deviceassociated with the client device upon expiration of the predeterminedwaiting period.
 16. The non-transitory computer-readable medium of claim15, wherein the program further causes the client device to at least:associate the value with a key and a first timestamp; associate thesecond value with a second key and a second timestamp; and determinewhether the value and the second value have changed since a previoussynchronization with an application synchronization service based atleast in part upon the first timestamp and the second timestamp.
 17. Thenon-transitory computer-readable medium of claim 15, wherein the programfurther causes the client device to at least reset the predeterminedwaiting period upon storage of the application state cache in the massstorage device.
 18. The non-transitory computer-readable medium of claim15, wherein the program further causes the client device to at leastinitiate transmission of the value and the second value to anapplication synchronization service upon expiration of an additionalwaiting period.
 19. The non-transitory computer-readable medium of claim18, wherein the program further causes the client device to at leastreset a synchronization status flag associated with respective valueswithin the application state data upon transmission of the value and thesecond value to the application synchronization service.
 20. Thenon-transitory computer-readable medium of claim 15, wherein the programfurther causes the at least one computing device to at least: store athird value to the application state cache during a subsequentpredetermined waiting period; update the application state data in themass storage device with the third value upon expiration of thesubsequent predetermined waiting period; and transmit the updatedapplication state data to an application synchronization service uponexpiration of another subsequent predetermined waiting period.